package router

import (
	"k8s-admin/controller/kubernetes"
	"k8s-admin/middleware"

	"github.com/gin-gonic/gin"
)

func StartStatefulSet(gin *gin.Engine) {
	statefulset := gin.Group("statefulset/:cid")

	statefulset.Use(middleware.K8sCache(), middleware.ChecKToken())
	{
		statefulset.GET("getClusterStatefulSetList", kubernetes.StatefulsetLists)
		statefulset.GET("getStatefulSetInfo", kubernetes.GetClusterStatefulSet)
		statefulset.POST("createClusterStatefulSet", kubernetes.CreateClusterStatefulSet)
		statefulset.DELETE("deleteClusterStatefulSet", kubernetes.DeleteClusterStatefulSet)
		statefulset.PUT("updateClusterStatefulSet", kubernetes.UpdateClusterStatefulSet)
	}
}
